package org.clever.dubbo.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import org.clever.dubbo.api.DemoService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 作者： lzw<br/>
 * 创建时间：2018-09-26 17:57 <br/>
 */
@RestController
public class DemoConsumerController {

    @Reference
    private DemoService demoService;

    @GetMapping("/sayHello")
    public String sayHello(@RequestParam String name) {
        return demoService.sayHello(name);
    }

}
